Repository navigation
Follow Here's My Church's claimed listings and automatic checks - #13
Merged
Merged
Conversation
Here's My Church now lets a church that has claimed its listing review others' changes first, and checks held changes automatically before a person sees them. Lookup handles both, and still works with today's HMC: - Contributions pass through reviewBy: "church" from HMC's answer. The statuses are unchanged, and a maintenance 503 is still try_again. - Sync carries claimed from the export into a new D1 column (migration m4) and the record returns claimed: true/false. Only a claimed row hashes the flag, so existing rows don't all rewrite. - /v1/meta adds checks to each contributable field; review is kept. - The widget and the shadcn ChurchConsent badge a blank field "Goes live", a replacement "Checked automatically", a claimed listing "The church reviews this", and a held-for-church result "Sent to the church", in all six languages. - Docs describe the real rules, and that AI only locates a quote on the church's website that code then verifies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Here's My Church is adding two things (harvouscom/heresmychurch#56 and #58): a church that has claimed its listing reviews everyone else's changes first, and held changes are checked automatically (deterministic checks, the church's own website with a Workers AI-located quote that code verifies, a 72-hour quiet period for low-risk fields), with a human reviewer for what can't be decided. This PR makes Lookup understand both.
Worker
statusFromreads an optionalreviewByfrom HMC's JSON; contribution results carryreviewBy: "church"when present. Statuses are unchanged (live,in_review, …), and the 503/maintenance handling is untouched: a 503 is stilltry_again, neverrejected.claimedcolumn (worker/schema.sql,worker/migrations-m4.sql), carried from the export throughproject/sync/writeChurchand returned on the record asclaimed: boolean. Only a claimed row hashes the flag, so unclaimed rows keep theirdoc_hashand the next sync doesn't rewrite every row.CONTRIBUTABLE_FIELDSkeepsreviewfor compatibility and addschecks:"automatic"(service times, denomination, languages, ministries, phone),"automatic-then-reviewer"(name, website, address, email, pastor name, closed/duplicate reports) and"reviewer"(moves)./v1/metashows it. The doc comment now describes the real rules.lookup-demosandbox answersin_review+reviewBy: "church"on a claimed listing.SDK, widget and shadcn registry
checked,churchReviews,sentToChurchin English, es, fr, de, pt and pl.reviewedstays inStrings(no longer shown) so existing overrides still type-check.consentBadgeandresultText, shared by<church-lookup>andChurchConsent. Optional types:ChurchRecord.claimed,reviewByon results,checkson meta. Registry lib and shadcn demo copies regenerated. CHANGELOG has an Unreleased entry. Core is 5.3 KB gzipped (budget 5.5).Docs
docs/data.md: the review table is rewritten (it said service times etc. went live on one vote).docs/api.md:claimedon the record,checkson meta, andreviewByin the statuses section.docs/index.mdanddocs/how-search-works.md: church-owner review first, automated checks where AI only locates a quote on the church's website and code verifies it, and a person for what the checks can't decide. Ranking is still described as a formula, not AI.Compatibility
Backward compatible with the HMC that's live today: every new field is optional and additive. Without
claimedin the export, every record saysclaimed: false; withoutreviewBy, results are exactly as before. The new behaviour depends on harvouscom/heresmychurch#56 and #58 shipping. Until then, the "Checked automatically" badge describes a replacement more cautiously than today's HMC treats phone and service times.Before deploy
worker/migrations-m4.sqlto the production D1 before deploying this Worker, because sync writes theclaimedcolumn.Tests
pnpm test: registry check, worker 217 passed, SDK 191 passed.pnpm typecheck: clean.reviewBypassthrough, 503 stilltry_again, sandbox on a claimed listing,claimedthrough sync/writeChurch/toRecord, hash stability, metachecks, badge and result wording.🤖 Generated with Claude Code